package ro.myApp.commons.service;

import ro.myApp.commons.basic.PersistentEntity;

public interface EntityActionService<E extends PersistentEntity> {
	
	
	public E updateEntity (E entity);
	
	public boolean deleteEntity (E entity);
	
	public boolean deleteEntityPermanently (E entity);
	
	public void flush ();

	<F extends PersistentEntity> F updateOtherEntity(F entity);


	E createEntity(Class<E> clazz, String username);

	<F extends PersistentEntity> F createOtherEntity(Class<F> clazz, String username);

}
